<template>
  <div>
    <div class="view-window">
      <router-view />
    </div>
    <van-tabbar
      v-model="currentPage"
      class="tabbar"
      active-color="#ea703c"
      route
    >
      <van-tabbar-item
        name="homepage"
        to="/home"
        icon="home-o"
      >
        首页
      </van-tabbar-item>
      <van-tabbar-item
        name="qapage"
        to="/qa"
        icon="chat-o"
      >
        问答
      </van-tabbar-item>
      <van-tabbar-item
        name="videopage"
        to="/video"
        icon="tv-o"
      >
        视频
      </van-tabbar-item>
      <van-tabbar-item
        name="minepage"
        to="/mine"
        icon="contact"
      >
        我的
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'MainPage',
  data() {
    return {
      currentPage: 'homepage',
    };
  },
  methods: {

  },
}
</script>

<style lang="less" scoped>
  .tabbar {
    background-color: #f8f7fa;
  }
  .view-window {
    height: calc(100vh - 50px);

    >div {
      height: 100%;
  }
}
</style>
